import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:kq_flutter_core_widget/utils/kq_screen_util.dart';
import 'package:kq_flutter_widgets/theme/configs/button/kq_button_theme_config.dart';
import 'package:kq_flutter_widgets/theme/configs/pullDown/kq_pullDown_theme_config.dart';
import 'package:kq_flutter_core_widget/utils/ex/num_ex.dart';

import '../../resources/kq_theme_colors.dart';
import '../configs/common/kq_common_theme_config.dart';
import '../configs/dialog/kq_dialog_theme_config.dart';
import '../configs/form/kq_form_theme_config.dart';
import '../configs/kq_theme_config.dart';

/// 默认主题
class KqDefaultConfigUtils {
  /// 默认所有主题配置
  static KqThemeConfig defaultAllConfig = KqThemeConfig(
    formConfig: defaultFormConfig,
  );

  /// 默认通用主题
  static KqCommonThemeConfig defaultCommonConfig = KqCommonThemeConfig(
      mainColor: KqThemeColors.bgBlue,
      mainLightColor: KqThemeColors.textLightBlue,
      bgColor: KqThemeColors.bgD8,
      itemBgColor: KqThemeColors.bgWhite,
      titleTextColor: KqThemeColors.textWhite,
      lineColor: Colors.black.withOpacity(0.08),
      lineWidth: 1.px,
      inputColor: KqThemeColors.text59,
      itemTitleColor: KqThemeColors.text26,
      itemContentColor: KqThemeColors.text59,
      placeHolderColor: KqThemeColors.textBF);

  /// 默认表单主题
  static KqFormThemeConfig defaultFormConfig = KqFormThemeConfig(
    mustInputFontSize: 14.sp,
    titleFontSize: 14.sp,
    contentFontSize: 14.sp,
    unitFontSize: 14.sp,
    headerFontSize: 14.sp,
    titleMaxWidth: 200.r,
    paddingVertical: 15.r,
    paddingHorizontal: 16.r,
    headerTextColor: KqThemeColors.text26,
  );

  /// 默认对话框主题
  static KqDialogThemeConfig defaultDialogConfig = KqDialogThemeConfig(
      titleColor: KqThemeColors.text26,
      msgColor: KqThemeColors.text59,
      itemTextColor: KqThemeColors.text26,
      cancelBtnColor: KqThemeColors.text8C,
      middleBtnColor: KqThemeColors.text8C,
      mainBtnColor: defaultCommonConfig.mainLightColor,
      bgColor: KqThemeColors.bgWhite,
      bottomSheetBgColor: KqThemeColors.bgFA,
      radius: 8.r,
      reasonBgColor: KqThemeColors.bgF4,
      reasonTextColor: KqThemeColors.text59);

  /// 默认按钮主题
  static KqButtonThemeConfig defaultButtonConfig = KqButtonThemeConfig(
      headButtonMenuIconColor: KqThemeColors.text26,
      headButtonMenuTextColor: KqThemeColors.text26,
      headButtonMenuFontSize: 14.sp);

  /// 默认下拉菜单主题
  static KqPullDownMenuThemeConfig defaultPullDownMenuConfig =
      KqPullDownMenuThemeConfig(
          headFontSize: 14.sp,
          menuFontSize: 14.sp,
          selectColor: KqThemeColors.bgBlue);
}
